home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / catD / mmap.z / mmap
Encoding:
Text File  |  2002-10-03  |  4.6 KB  |  132 lines

  1.  
  2.  
  3.  
  4. mmmmmmmmaaaapppp((((DDDD2222))))                                                              mmmmmmmmaaaapppp((((DDDD2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      _mmmm_mmmm_aaaa_pppp - support virtual mapping for memory-mapped device
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_tttt_yyyy_pppp_eeee_ssss_...._hhhh_>>>>
  13.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_pppp_aaaa_rrrr_aaaa_mmmm_...._hhhh_>>>>
  14.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_mmmm_mmmm_aaaa_nnnn_...._hhhh_>>>>
  15.      _####_iiii_nnnn_cccc_llll_uuuu_dddd_eeee _<<<<_ssss_yyyy_ssss_////_dddd_dddd_iiii_...._hhhh_>>>>
  16.      _iiii_nnnn_tttt _p_r_e_f_i_x_mmmm_mmmm_aaaa_pppp_((((_dddd_eeee_vvvv______tttt _d_e_v_,,,, _oooo_ffff_ffff______tttt _o_f_f_,,,, _iiii_nnnn_tttt _p_r_o_t_))))_;;;;
  17.  
  18.    AAAArrrrgggguuuummmmeeeennnnttttssss
  19.      _d_e_v  Device whose memory is to be mapped.
  20.  
  21.      _o_f_f  Offset within device memory at which mapping begins.
  22.  
  23.      _p_r_o_t Protection flags from _mmmm_mmmm_aaaa_nnnn_...._hhhh.
  24.  
  25. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  26.      The _mmmm_mmmm_aaaa_pppp entry point provides a way to support character drivers for
  27.      memory-mapped devices.  A memory-mapped device has memory that can be
  28.      mapped into a process's address space.  The _mmmm_mmmm_aaaa_pppp(2) system call, when
  29.      applied to a character special file, allows this device memory to be
  30.      mapped into user space for direct access by the user application (this
  31.      way no kernel buffering or system call overhead is incurred).
  32.  
  33.      The _mmmm_mmmm_aaaa_pppp routine checks if the offset is within the range of pages
  34.      supported by the device.  For example, a device that has 32K bytes of
  35.      memory that can be mapped into user space should not support offsets
  36.      greater than, or equal to, 32K.  If the offset does not exist, then
  37.      _NNNN_OOOO_PPPP_AAAA_GGGG_EEEE is returned.  If the offset does exist, the _mmmm_mmmm_aaaa_pppp routine returns
  38.      the physical page ID for the page at offset _o_f_f in the device's memory;
  39.      that is, the offset in units of pages.
  40.  
  41.    RRRReeeettttuuuurrrrnnnn VVVVaaaalllluuuueeeessss
  42.      If the protection and offset are valid for the device, the driver should
  43.      return the physical page ID.  Otherwise, _NNNN_OOOO_PPPP_AAAA_GGGG_EEEE should be returned.
  44.  
  45. UUUUSSSSAAAAGGGGEEEE
  46.      This entry point is optional, and valid for memory-mapped character
  47.      device or character pseudo-device drivers only.
  48.  
  49.      Valid values for _p_r_o_t are:
  50.  
  51.           _PPPP_RRRR_OOOO_TTTT______RRRR_EEEE_AAAA_DDDD     Page can be read.
  52.  
  53.           _PPPP_RRRR_OOOO_TTTT______WWWW_RRRR_IIII_TTTT_EEEE    Page can be written.
  54.  
  55.           _PPPP_RRRR_OOOO_TTTT______EEEE_XXXX_EEEE_CCCC     Page can be executed.
  56.  
  57.  
  58.  
  59.  
  60.  
  61.                                                                         PPPPaaaaggggeeee 1111
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. mmmmmmmmaaaapppp((((DDDD2222))))                                                              mmmmmmmmaaaapppp((((DDDD2222))))
  69.  
  70.  
  71.  
  72.           _PPPP_RRRR_OOOO_TTTT______AAAA_LLLL_LLLL      All of the above.
  73.  
  74.    SSSSyyyynnnncccchhhhrrrroooonnnniiiizzzzaaaattttiiiioooonnnn CCCCoooonnnnssssttttrrrraaaaiiiinnnnttttssss
  75.      The _mmmm_mmmm_aaaa_pppp routine has user context and can sleep.
  76.  
  77. RRRREEEEFFFFEEEERRRREEEENNNNCCCCEEEESSSS
  78.      _mmmm_aaaa_pppp(D2X), _uuuu_nnnn_mmmm_aaaa_pppp(D2X)
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.                                                                         PPPPaaaaggggeeee 2222
  128.  
  129.  
  130.  
  131.